import request from '@/utils/request'
import mock from "@/utils/courseMock";

export interface oneSort {
    name: string;
    id: string;
}
export interface sortListModel {
    choises: oneSort[];
    formType: string;
    label: string;
    name: string;
    style: string;
    valueType: string;
}

export interface motif {
    cover: string;
    webUrl: string;
    name: string;
    remark: string;
    updateTime: number;
    id: string;
    onsellTime: number;
}
export interface motifModel {
    content: motif[];
    first: boolean;
    last: boolean;
    number: number;
    numberOfElements: number;
    offset: null;
    size: number;
    sort: null;
    statistics: null;
    totalElements: number;
    totalPages: number;
    useOffset: boolean;
}

export default {
    //获取会员专区/视频课分类属性列表数据
    reqSortList() {
        return mock.get<any, sortListModel[]>("/sortList");
    },
    //获取直播课分类属性列表
    reqLiveList() {
        return mock.get<any, sortListModel[]>("/liveList");
    },
    //获取线下课分类属性列表
    reqOfflineList() {
        return mock.get<any, sortListModel[]>("/offlineList");
    },
    //获取主题页面图片的数据
    reqmotif() {
        return mock.get<any, motifModel>("/motiflist");
    },
};
